<?php if (!defined('THINK_PATH')) exit();?><form id="pagerForm" action="__URL__" method="post">
	<input type="hidden" name="pageNum" value="1"/>
	<input type="hidden" name="_order" value="<?php echo ($_REQUEST["_order"]); ?>"/>
	<input type="hidden" name="_sort" value="<?php echo ($_REQUEST["_sort"]); ?>"/>
    <input type="hidden" name="numPerPage" value="<?php echo ($_REQUEST["numPerPage"]); ?>" />
</form>


<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__URL__" method="post">
	<div class="searchBar">
        <ul class="searchContent">
			<li>
				<label>全文关键字查询：</label>
				<input type="text" name="selectname" value="<?php echo ($_POST['selectname']); ?>"/>
			</li>
            <li>
				<label>报价类型：</label>
				<select name="qtype" class="combox">
                    <option value="" <?php if(($_POST['qtype']) == ""): ?>selected<?php endif; ?>>全部报价</option>
					<option value="1" <?php if(($_POST['qtype']) == "1"): ?>selected<?php endif; ?>>销售报价</option>
					<option value="2" <?php if(($_POST['qtype']) == "2"): ?>selected<?php endif; ?>>进货报价</option>
				</select>
			</li>
		</ul> 
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="__URL__/add" target="navTab" mask="true"><span>新增报价</span></a></li>
			<li><a class="delete" href="__URL__/delQuotes" target="selectedTodo" rel="ids[]" title="注意：删除将直接删除报价及其记录数据，你确定要删除该报价吗？" warn="请勾选要删除的报价"><span>批量删除报价</span></a></li>
			<li><a class="edit" href="__URL__/edit/id/{sid_user}" target="dialog" mask="true" warn="请选择要修改的报价"  height="400"><span>修改报价</span></a></li>
            <?php if(($_POST['qtype']) == "1"): ?><li><a class="edit" href="__URL__/updProductsPrice" target="selectedTodo" mask="true" rel="ids[]" title="注意:该操作将直接覆盖之前的商品预设销售价格,您确定要更新吗？" warn="请勾选要更新的报价"><span>批量更新含税价到预售价</span></a></li><?php endif; ?>
		    <li><a class="icon" href="javascript:$.printBox('w_list_print')"><span>打印</span></a></li>
        </ul>
	</div>

	<div layoutH="116" id="w_list_print">
	<table class="list" targetType="navTab" asc="asc" desc="desc">
		<thead>
		<tr>
            <th><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
			<th>序号</th>
			<th orderField="prodname" <?php if($_REQUEST["_order"] == 'prodname'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>商品名称</th>
			<th orderField="partmodel" <?php if($_REQUEST["_order"] == 'partmodel'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>型号</th> 
            <th orderField="prodsize" <?php if($_REQUEST["_order"] == 'prodsize'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>规格</th> 
            <th orderField="comname" <?php if($_REQUEST["_order"] == 'comname'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>报价单位</th> 
            <th orderField="qtype" <?php if($_REQUEST["_order"] == 'qtype'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>报价类型</th>
            <th orderField="qtime" <?php if($_REQUEST["_order"] == 'qtime'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>报价日期</th>
            <th orderField="qtaxprice" <?php if($_REQUEST["_order"] == 'qtaxprice'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>含税价(￥)</th>  
            <th orderField="qprice" <?php if($_REQUEST["_order"] == 'qprice'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>不含税价(￥)</th>            
            <th orderField="bothprice" <?php if($_REQUEST["_order"] == 'bothprice'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>税差价(￥)</th>
            <th orderField="presale" <?php if($_REQUEST["_order"] == 'presale'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>当前售价(￥)</th>
            <th orderField="updatetime" <?php if($_REQUEST["_order"] == 'updatetime'): ?>class="<?php echo ($_REQUEST["_sort"]); ?>"<?php endif; ?>>更新时间</th>
            <th>备注</th>     	
		</tr>
		</thead>
		<tbody>
		<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr target="sid_user" rel="<?php echo ($vo['id']); ?>">
                <td><input name="ids[]" value="<?php echo ($vo['id']); ?>" type="checkbox"></td>
				<td align=center><?php echo ($key+1); ?></a></td>
				<td><a href="__URL__/showContrast/pid/<?php echo ($vo['prodid']); ?>" class="showlog" title="进销价对比[ <?php echo ($vo['prodname']); ?> ]" target="dialog" mask="true" width="600" height="500"><?php echo ($vo['prodname']); ?></td>
				<td><?php echo ($vo['partmodel']); ?></td> 
                <td><?php echo ($vo['prodsize']); ?></td>
                <td><?php echo ($vo['comname']); ?></td>
                <td><?php echo (getqtypes($vo['qtype'])); ?></td>
                <td><a href="__URL__/showlog/id/<?php echo ($vo['id']); ?>" class="showlog" title="查看修改记录" target="dialog" mask="true" width="700" height="500"><?php echo (date("Y-m-d",$vo['qtime'])); ?></a></td>
                <td align=right><?php echo ($vo['qtaxprice']); ?></td>
                <td align=right><?php echo ($vo['qprice']); ?></td>                
                <td align=right><?php echo ($vo['bothprice']); ?></td>
                <td align=right><?php echo ($vo['presale']); ?></td>
                <td><?php echo (date("Y-m-d  H:i:s",$vo['updatetime'])); ?></td>
                <td><?php echo ($vo['remarks']); ?></td>                    
			</tr><?php endforeach; endif; else: echo "" ;endif; ?>
		</tbody>
	</table>
    </div>
	<div class="panelBar">
		<div class="pages">
			<span>共<?php echo ($totalCount); ?>条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="<?php echo ($totalCount); ?>" numPerPage="<?php echo ($numPerPage); ?>" pageNumShown="10" currentPage="<?php echo ($currentPage); ?>"></div>
	</div>

</div>